package demo011.HttpServer;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class StartHttpServer {
	static StartHttpServer me =new StartHttpServer();
	public void startServer(int port){
		try {
			@SuppressWarnings("resource")
			ServerSocket serverSocket = new ServerSocket(port);
			while(true){
				Socket socket = serverSocket.accept();
				new HttpServer(socket).start();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String args[]){
		me.startServer(80);
	}

}
